//
//  UIView+frame.swift
//  GZWeibo007
//
//  Created by 汪明 on 15/12/25.
//  Copyright © 2015年 Apple. All rights reserved.
//

import UIKit


extension UIView {
    
    
    var y: CGFloat{
        
        get{
            
            return self.frame.origin.y
        }
        set{
            
            var frame=self.frame
            frame.origin.y=newValue
            self.frame=frame
        }
        
    }
    var x: CGFloat{
        
        get{
            
            return self.frame.origin.x
        }
        set{
            
            var frame=self.frame
            frame.origin.x=newValue
            self.frame=frame
        }
        
    }
    var width: CGFloat{
        
        get{
            
            return self.frame.size.width
        }
        set{
            
            var frame=self.frame
            frame.size.width=newValue
            self.frame=frame
        }
        
    }
    var height: CGFloat{
        
        get{
            
            return self.frame.size.height
        }
        set{
            
            var frame=self.frame
            frame.size.height=newValue
            self.frame=frame
        }
        
    }
    
    
    var size: CGSize{
        
        get{
            
            return self.frame.size
        }
        
        set{
            
            var frame = self.frame
            
            frame.size = newValue
            
            self.frame = frame
            
        }
        
    }
    var origin: CGPoint{
        
        get{
            
            return self.frame.origin
        }
        
        set{
            
            var frame = self.frame
            
            frame.origin = newValue
            
            self.frame = frame
            
            
            
        }
        
    }

}
